//专门用来生成用户临时id的函数
import {nanoid} from "nanoid";

export default function addId() {
	let localTempId = localStorage.getItem("tempId");
	
	if (localTempId) {
		return localTempId;
	} else {
		localTempId = nanoid();  // 随机出唯一标识id
		localStorage.setItem("tempId", localTempId);
	}
	
}